import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;


public class PWork 
{
	static public void Save( Person  p) throws FileNotFoundException
	{
		PrintWriter First=new PrintWriter(new FileOutputStream("e:\\Person.txt"));
		First.println( p.toString() );
		First.close();
	}

	static public Person Load() throws FileNotFoundException
	{		
		Scanner scanner = new Scanner(new File("e:/Person.txt") );
		String str = scanner.nextLine();
		StringTokenizer st = new StringTokenizer(str, ";");
		
		int id = Integer.parseInt( st.nextToken() );
		String FName = st.nextToken();
		String LName = st.nextToken();
		int age= Integer.parseInt( st.nextToken() );
		
		Person p = new Person(id, FName, LName, age);
		return p;
	}

	/*
	while( st.hasMoreTokens() )
	{
		System.out.println(st.nextToken());
	}
	*/

	
}
